  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!--bootstrap-->
  <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

  <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

  <!--bootstrap-->
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js" type="text/javascript"></script>

    <!-- jquery validation -->
  	<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"></script>
  	<!--
  		<script src="http://jquery.bassistance.de/validate/additional-methods.js"></script>
  	-->
  
  	<script type="text/javascript">

	    if (jQuery.validator) 
	    {
		      jQuery.validator.setDefaults({
		        debug: true,
		        errorClass: 'has-error',
		        validClass: 'has-success',
		        ignore: "",
		        highlight: function (element, errorClass, validClass) {
		          $(element).closest('.form-group').removeClass('has-success').addClass('has-error');
		        },
		        unhighlight: function (element, errorClass, validClass) {
		          $(element).closest('.form-group').removeClass('has-error').addClass('has-success');
		          $(element).closest('.form-group').find('.help-block').text('');
		        },
		        errorPlacement: function (error, element) {
		          $(element).closest('.form-group').find('.help-block').text(error.text());
		        },
		        submitHandler: function (form) {
		          if ($(form).valid()) {
		            form.submit();
		          }
		        }
		      });
		}
	</script>
